Add translation workflow: issue/PR templates and auto-generated language switcher#60
Open
Lacah wants to merge 3 commits into
Open
Add translation workflow: issue/PR templates and auto-generated language switcher#60Lacah wants to merge 3 commits into
Lacah wants to merge 3 commits into
Conversation
Contributors can now claim a language via issue template, submit README/CONTRIBUTING/CODE_OF_CONDUCT translations under translations/<iso>/, and have the language switcher auto-generated by a script that runs on push to main. README.md itself is untouched since it's regenerated externally from .github/templates/rootreadmetemplate.md. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Resolve conflict in CONTRIBUTING.md: keep the language-switcher marker
block and the grammar fix from main ("host repository for other
repositories").
Contributor
Author
|
NGL, I fell into an internalization rabbit hole, and this is the result. Do we want to even consider going in this direction? Is there a point? WDYT? |
Add Bengali, Tamil, Telugu, Marathi, Gujarati, Kannada, Malayalam, Punjabi, Odia, and Assamese alongside the existing Hindi entry, since Indian contributors are likely to be among the first translators. Bengali, Punjabi, and Urdu get dual flags since each is a national language of two countries. Switch English's flag from GB to US.
|
I think it's a great idea |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.github/ISSUE_TEMPLATE/translation.yml) — contributors claim a language and follow a checklist covering folder naming (translations/<iso-code>/), keeping filenames identical, requiring all 3 docs (README, CONTRIBUTING, CODE_OF_CONDUCT) in one PR, correct same-language cross-linking, and not duplicating images..github/PULL_REQUEST_TEMPLATE/translation.md), scoped via the multi-template convention so it doesn't affect unrelated PRs..github/scripts/update-language-switcher.js, zero dependencies) — scanstranslations/, fills in the<!-- LANGUAGE_SWITCHER:START/END -->block in every doc that has it, and regeneratestranslations/README.mdas a status index table. Contributors are told to leave the marker block empty; the script owns it..github/workflows/language-switcher.yml) — runs the generator and pushes the result on any push tomainthat touchestranslations/**or the relevant docs/template.CONTRIBUTING.md,CODE_OF_CONDUCT.md, and.github/templates/rootreadmetemplate.md.README.mditself is untouched — perAGENTS.md/CONTRIBUTING.mdit's regenerated by an external ServiceNow process from the template, so the switcher is added to the template and will flow through on the next regeneration.Test plan
translations/README.mdshows "No translations yet").translations/es/{README,CONTRIBUTING,CODE_OF_CONDUCT}.mdfixture, reran the generator, and verified: correct bidirectional cross-linking (root docs link to the Spanish file, the Spanish file links back to English), current language rendered bold/non-linked, and thetranslations/README.mdindex table populated correctly. Removed the fixture afterward.